package role

import (
	"news_for_deepseek_interface/controller"
	roleService "news_for_deepseek_interface/service/admin/system/role"

	"github.com/gin-gonic/gin"
)

func All(c *gin.Context) {

	// 1. 调用服务层处理登录逻辑
	response, err := roleService.All()
	if err != nil {
		controller.Fail(c, controller.BusinessError, err.Error())
		return
	}

	// 2. 返回成功响应
	controller.Success(c, response)
}
